		<div class="des_l">
        	<div class="des_l_title">套图案例</div>
            <div style="DIRECTION: ltl; SCROLLBAR-FACE-COLOR: #e7e7e7; FILTER: chroma(COLOR=#ffffff); SCROLLBAR-HIGHLIGHT-COLOR: #ffffff; OVERFLOW: auto; WIDTH: 100%; SCROLLBAR-SHADOW-COLOR: #ffffff; COLOR: #ffffff; SCROLLBAR-3DLIGHT-COLOR: #ffffff; SCROLLBAR-ARROW-COLOR: #736F6C; SCROLLBAR-DARKSHADOW-COLOR: #ffffff; SCROLLBAR-BASE-COLOR: #ffffff; HEIGHT: 550px;">
				<script language="javascript">
					function opencat(cat,img){
						if(cat.style.display=="none"){
							cat.style.display="";
							//img.src="/img/arrow_01.gif";
						} else {
							cat.style.display="none"; 
							//img.src="/img/arrow_02.gif";
						}
					}
				</script>
				
				<table cellspacing="0" cellpadding="0" width="220" border="0" align="center">
					<tbody>
						<?php 
							$tpl = '	<tr><td class="p3" language="javascript" onmouseup="{#JS#}" id="item$pval[catID])" style="CURSOR: hand"><img id="{#IMGKEY#}" src="/img/arrow_02.gif"></td><td class="p1"><a href="/designspace?tag={#TAG#}">{#NAME#}</a></td></tr>';
							$tplJS = 'opencat({#CATKEY#},{#IMGKEY#});';
							$tplNoSub = '<tr><td id="{#CATKEY#}" style="display: none; " colspan="2"><div class="p1">没有小类</div></td></tr>';
							$tplSub = '<tr><td id="{#SUBCATKEY#}" style="display: {#DISPLAY#}; " colspan="2"><div class="p2">&nbsp;&nbsp;&nbsp;&nbsp;<a href="/designspace?tag={#SUBTAG#}">{#SUBNAME#}</a></div></td></tr>';
							
							$html = '';
							if( ! empty($designspaces)){
								foreach ($designspaces as $item){
									$catKey = 'cat' . $item['tag'];
									$imgKey = 'img' . $item['tag'];
									$tag = $item['tag'];
									$name = $item['name'];
									
									$t1 = str_replace('{#TAG#}', $tag, $tpl);
									$t1 = str_replace('{#NAME#}', $name, $t1);
									$t1 = str_replace('{#IMGKEY#}', $imgKey, $t1);
									
									if(empty($item['sub'])){
										$t2 = str_replace('{#CATKEY#}', $catKey, $tplNoSub);
										
										$tjs = str_replace('{#CATKEY#}', $catKey, $tplJS);
										$tjs = str_replace('{#IMGKEY#}', $imgKey, $tjs);
										$t1 = str_replace('{#JS#}', $tjs, $t1);
										
										$html = $html . $t1 . $t2;	
									}else{
										$tjs = '';
										$tsub = '';
										
										$display = 'none';
										foreach ($item['sub'] as $sub){
											if($sub['name'] == $designspace['name']){
												$display = 'auto';	
												break;
											}
										}
										
										foreach ($item['sub'] as $sub){
											$subCatKey = 'cat' . $sub['tag'];
											$subTag = $sub['tag'];
											$subName = $sub['name'];
											
											$t3 = str_replace('{#SUBCATKEY#}', $subCatKey, $tplSub);
											$t3 = str_replace('{#SUBTAG#}', $subTag, $t3);
											$t3 = str_replace('{#SUBNAME#}', $subName, $t3);
											$t3 = str_replace('{#DISPLAY#}', $display, $t3);	
											
											
											$tjss = str_replace('{#CATKEY#}', $subCatKey, $tplJS);
											$tjss = str_replace('{#IMGKEY#}', $imgKey, $tjss);
											
											$tsub = $tsub . $t3;
											$tjs = $tjs . $tjss;
										}
										$t1 = str_replace('{#JS#}', $tjs, $t1);
										$html = $html . $t1 . $tsub;
									}
								}
							}
							echo $html;
						?>
					</tbody>
				</table>
				
				<div class="contactus" style="margin-top:30px;">
					<dl>
						<dt>
            				<a href="#">
            					<span class="my_header_cn">联系我们&nbsp;</span>
            					<span class="my_header_en">Contact</span>
            				</a>
            			</dt>
            			<dt class="my_header_underline"></dt>
            			<dt class="my_header_underline"></dt>
						<dd style="padding-top:10px;">
							公司：<?php echo $company['name'];?><br>
							营业时间：<?php echo $company['officehours'];?><br>
							服务热线：<?php echo $company['tel'];?><br>
							联系人：<?php echo $company['contact'];?><br>
						</dd>
					</dl>
				</div>
			</div>
		</div>